<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
	<canvas id="canvas" width="500" height="500" style="border: 1px solid #ccc"></canvas>

</body>
</html>

<script type="text/javascript">
	var canvas = document.getElementById('canvas');
	var context = canvas.getContext('2d');
	context.fillStyle = 'yellow';
	context.fillRect(0,0,250,100);

	context.transform(1,0.5,- 0.5,1,30,10);
	context.fillStyle = 'red';
	context.fillRect(0,0,250,100);

	context.transform(1,0.5,- 0.5,1,30,10);
	context.fillStyle='blue';
	context.fillRect(0,0,250,100)
	
</script>